<cfprocessingdirective suppresswhitespace="yes">
<!--- 
***** REVISION *****
10/18/06: This is a new tag
 --->
 	
<cfswitch expression="#thisTag.executionMode#">
	<cfcase value="start">
		<cfset tag = "button"/>

		<cfsavecontent variable="attributeCombination">
		<strong>Available Attributes are:</strong>
		<LI>Required attributes: NAME or ID or VALUE.</LI>
		</cfsavecontent>				

		<cfinclude template="inc/start.cfm"/>

		<cfset excludes = parent.excludes & ",text,type"/>

		<cfset parent.config[tag].count = parent.config[tag].count + 1/>
		
		<!--- Process NAME attribute --->
		<cfif not structKeyExists(attributes,'name')>		
			<cfif structKeyExists(attributes,'id')>
				<cfparam name="attributes.action" default="#parent.setValue('id','name',attributes)#"/>
			<cfelseif structKeyExists(attributes,'text')>
				<cfparam name="attributes.action" default="#parent.setValue('text','name',attributes)#"/>
			<cfelseif structKeyExists(attributes,'value')>
				<cfparam name="attributes.action" default="#parent.setValue('value','name',attributes)#"/>
			<cfelseif structKeyExists(attributes,'action')>
				<cfparam name="attributes.name" default="#listLast(listFirst(attributes.action,'&'),'.')#"/>
			<cfelseif isDefined("request.ui.form.#tag#.html") and structKeyExists(request.ui.form[tag].html,'name')>
				<cfset attributes.name = request.ui.form[tag].html.name/>
			<cfelse>
				<cfif arraylen(parent.config.buttons)>
					<cfset attributes.name = "button_#arraylen(parent.config.buttons)#"/>
				<cfelse>
					<cfset attributes.name = "button"/>
				</cfif>
			</cfif>
		</cfif>
		<cfparam name="attributes.action" default="#parent.setValue('name','',attributes)#"/>

		<!--- *** CONFIG VARIABLES *** --->
		<cfset config = parent.getConfig(tag,attributes,request,parent)/>
		
		<!--- *** HTML VARIABLES *** --->
		<cfset attributes = parent.getHtml(tag,attributes,request)/>
				
		<cfparam name="attributes.id" default="#attributes.name#"/>
		<cfif config.fusebox>
			<cfinclude template="inc/action.cfm"/>
		</cfif>
	</cfcase>
	
	
	<cfcase value="end">
		<cfinclude template="inc/field.cfm"/>
	</cfcase>
</cfswitch>
</cfprocessingdirective>